package org.NooLab.glue.subscription.context;

import org.NooLab.glue.msgframe.BasicMessageParams;
import org.NooLab.glue.msgframe.CtxtXMessage;
import org.NooLab.glue.msgframe.XMessage;
import org.NooLab.utilities.logging.PrintLog;

public class ContextInfra {


	
	// constants ......................
	/**  items, texts       */
	transient public final static int _ITEMS   = 1 ; 
	
	/**  missing items, thinning item group length, distances between elements   */
	transient public final static int _MIXES   = 3 ;  
	
	/**  weights, thresholds       */
	transient public final static int _WEIGHTS = 5 ;  
	
	/**  mandatory, normal, facultative, competing, exclusive: (mutual) exclusive subsets on items  */
	transient public final static int _SETS    = 7 ;   

	/**  rules of combination, organizational stuff  */
	transient public final static int _RULES   = 11 ;  

	/**  address in a particular associative region  */
	transient public final static int _AADDR   = 12 ;  
	
	// .................
	// descriptive detail parameter for sets 
	transient public final static int _SET_MANDATORY   = 1 ; // any missing item from this set denies the match
	transient public final static int _SET_NORMAL      = 2 ; // ...
	transient public final static int _SET_FACULTATIVE = 3 ; // does not count on thinning
	transient public final static int _SET_COMPETING   = 4 ; // if this is more similar, the match is denied
	transient public final static int _SET_EXCLUDING   = 5 ; // any item from this set denies the match

	/** no rules are given, just the information */
	transient public final static int  _CSTYL_JUSTINFO = 1;
	/** the basic item set and a simple threshold for matching */
	transient public final static int  _CSTYL_PLAIN    = 2;
	/** complete context  */
	transient public final static int  _CSTYL_COMPLETE = 3;

	transient public final static int  _DTYP_ITEMS    = 1;
	transient public final static int  _DTYP_FVECTOR  = 2;
	transient public final static int  _DTYP_FULLTEXT = 3;
	transient public final static int  _DTYP_BINIMG   = 4; // will be interpreted as jpg/jpeg
	
	
	// .................
	
	
	CtxtXMessage xmsg ;
	PrintLog out ;
	
	
	public ContextInfra( PrintLog outprn){
		
		out = outprn;
		xmsg = new CtxtXMessage(out);
	}

	public String prepareXmlForMessageContext(BasicMessageParams basics, Context context) {
		String cxml=""; 
		
		 
		cxml = xmsg.createXmlFromContextForMsgDescsription( basics , context);
		
		
		return cxml;
	}
	
	
}
